package com.asset.dispoal.assetInstitutionBatchParameter.service;

import com.asset.dispoal.assetInstitutionBatchParameter.api.AssetInstitutionBatchParameterService;
import com.asset.dispoal.assetInstitutionBatchParameter.dto.AssetInstitutionBatchParameterRequest;
import com.asset.dispoal.assetInstitutionBatchParameter.dto.AssetInstitutionBatchParameterResponse;
import com.asset.dispoal.assetInstitutionBatchParameter.service.commom.ParameterDeleteCommand;
import com.asset.dispoal.assetInstitutionBatchParameter.service.commom.ParameterInsertCommand;
import com.asset.dispoal.assetInstitutionBatchParameter.service.commom.ParameterQueryPageCommand;
import com.asset.dispoal.assetInstitutionBatchParameter.service.commom.ParameterUpdateCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

import java.util.List;

/**
 * @author qr
 * @date 2022/3/29$
 */
@Service
public class AssetInstitutionBatchParameterServiceImpl implements AssetInstitutionBatchParameterService {

    @Autowired
    ParameterQueryPageCommand parameterQueryPageCommand;

    @Autowired
    ParameterInsertCommand parameterInsertCommand;

    @Autowired
    ParameterUpdateCommand parameterUpdateCommand;

    @Autowired
    ParameterDeleteCommand parameterDeleteCommand;

    @Override
    public void insert(List<AssetInstitutionBatchParameterRequest> request) {
        parameterInsertCommand.execute(request);
    }

    @Override
    public void update(List<AssetInstitutionBatchParameterRequest> request) {
        parameterUpdateCommand.execute(request);
    }

    @Override
    public void delete(String id) {
        parameterDeleteCommand.execute(id);
    }

    @Override
    public Result<PageVO<AssetInstitutionBatchParameterResponse>> queryPage(AssetInstitutionBatchParameterRequest request) {
        return parameterQueryPageCommand.execute(request);
    }
}
